package day.day7_5;

import java.util.*;


public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        while (scan.hasNextInt()) {
            //棋盘的行数
            int n = scan.nextInt();
            //棋盘的列数
            int m = scan.nextInt();
            int[][] path = new int[n+1][m+1];
            for (int i = 0; i < n+1; i++) {
                for (int j = 0; j < m+1; j++) {
                    if (i == 0 || j == 0) {
                        path[i][j] = 1;
                    }else {
                        path[i][j] = path[i-1][j] + path[i][j-1];
                    }
                }
            }
            System.out.println(path[n][m]);
        }
    }
}